﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MsTestUtilities.RowTests;
using MsTestUtilities.Utilities;

namespace MsTestUtilitiesTests.RowTests.ExpectorTests
{
    [TestClass]
    public class InputBasedExpectationTests
    {
        private TestCase<int, int> _testCase;
        private Expector<int, int> _expector;
        private const int Given = 42;
        [TestInitialize]
        public void Setup()
        {           
            _testCase = new TestCase<int, int>(null);
            _testCase.SetPremises(Given);

            _expector = new Expector<int, int>(null, _testCase);
        }

        [TestMethod]
        public void ExpectationHoldsOnEquality()
        {
            _expector.ExpectTheSame();
            ExpectationAssert.IsValidFor(() => Given, _testCase.Expectation);            
        }

        [TestMethod]
        public void ExpectationFailsOnInequality()
        {
            _expector.ExpectTheSame();
            ExpectationAssert.FailsFor(() => 0, _testCase.Expectation);
        }

       
    }
}
